//
//  CHJUploadApp.m
//  
//
//  Created by jiaxuzhou on 2017/12/2.
//

#import "CHJUploadApp.h"
#import "CHJUploadManager.h"

@implementation CHJUploadApp

+ (void)delVideo:(CHJUploadVideo *)video {
    if (video) {
        [[CHJUploadManager sharedInstance] delLocalVideo:video];
    }
}

+ (void)UploadVideo:(CHJUploadVideo *)video {
    if (video) {
        [[CHJUploadManager sharedInstance] addUploadVideo:video];
        //        [[YXUploadManager sharedInstance] addTask:[[YXUploadTask alloc] initWithVideo:video]];
    }
}

+ (void)getUploadVideo:(CHJUploadModelBlock)block {
    [[CHJUploadManager sharedInstance] getUploadUnfinish:block];
}

+ (void)getNotModifyVideo:(CHJUploadModelBlock)block {
    [[CHJUploadManager sharedInstance] listVideo:@"`extinfo1` != 1 AND `isFinish` >= 1  AND status != 0" withBlock:block];
}

+ (void)getNotSendWeiboVideo:(CHJUploadModelBlock)block {
    [[CHJUploadManager sharedInstance] listVideo:@"`extinfo1` == 1 AND `isFinish` >= 1  AND status == 2 AND extInfo2 != 1" withBlock:block];
}

+ (void)getFinishVideo:(CHJUploadModelBlock)block {
    [[CHJUploadManager sharedInstance] listVideo:@"`extinfo1` == 1 AND `isFinish` >= 1 AND `extInfo1` = 1" withBlock:block];
}

+ (void)getUploadFailed:(CHJUploadModelBlock)block {
    [[CHJUploadManager sharedInstance] getUploadFailed:block];
}

+ (void)resumeFailedVideo:(CHJUploadVideo *)video {
    [[CHJUploadManager sharedInstance] resumeOperationFailedVideo:video];
}

@end
